module.exports = file => {
  file = file.indexOf('/views/') === 0 ? file.slice(7) : file
  try {
    return require('@/views/' + file).default
  } catch (error) {
    console.log(`%crequireFile失败，${error}`, 'color: red;font-size: 24px;font-weight: bold;background-color: yellow;')
    return require('@/views/errorPage/404').default
  }
}
